
package com.rasenhund.android.paintstock.dao;

import java.io.File;

import android.content.Context;

import com.rasenhund.android.paintstock.common.Const;

/**
 * Data Access Object Base Class
 */
public class BaseDao {

    protected Context mContext = null;
    private String mDbName = "";

    public BaseDao(Context context) {
        mContext = context;
        mDbName = Const.DB_NAME; // DB指定がなければデフォルトのDB名を使用
    }

    public BaseDao(Context context, String sDbName) {
        mContext = context;
        mDbName = sDbName;
    }

    /**
     * DBのパス取得
     * 
     * @return
     */
    protected String getDbPath() {
        return new File(mContext.getFilesDir(), mDbName).getPath();
    }

}
